Commit Graph

25 Commits

Author SHA1 Message Date
Mario Bertschler
c06af333cb Minor Refactoring only: no functional change
- organizing imports
- remove redundant modifiers on LauncherCallback interface
- fix typos

Change-Id: I61eb985cac7c1379b6b804a67d4f234386d3d1b4
2017-03-28 12:23:22 -07:00
Sunny Goyal
eb3ba0fdfb Removing some unnecessary stacktraces from the log
Bug: 36604650
Change-Id: If754aacf37fed5fdc9ff419812c0924ad136eb45
2017-03-27 11:23:18 -07:00
Sunny Goyal
87f784c285 Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of
a valid context

Bug: 33032833
Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
2017-01-11 12:52:03 -08:00
Sunny Goyal
32f3dda802 Adding a utility class to enforce that icons are always flattened on
the background thread.

Bug: 21325319
Change-Id: I4d0f02557cdbf70cfa86750ac047faf2917e39bf
2016-11-19 23:40:07 +05:30
Sunny Goyal
10629b077c Moving some image handling classes to .graphics package
Change-Id: Id6d3d0b9c345a503ff2e09f073eb4b6449e21c7e
2016-09-02 12:34:33 -07:00
Sunny Goyal
86df138d9f Adding support for pending widgets in AutoInstall layout
> Pending widgets whill show a loading progress while the app
is being installed.
> Extra bind options can be defined using the tub tags
    <extra key="key-name" value="key-value" />
  These are sent as widget options when the widget is bound.
> If the widget has any config activity, it is not shown
> Required attributes:
   className, packageName, x, y, spanY, spanY & screen

Bug: 30279609
Change-Id: I1338618bfa5d86967339dffb68c12b1add6eb5d7
2016-08-16 12:37:29 -07:00
Sunny Goyal
bb011dad4e Adding a flag (enabled by default) to remove the all-apps button.
All apps can still be opened by clicking the caret.

Bug: 29398447
Change-Id: I61f1b05cea83a0a49d7cc16c518c5419618ba779
2016-06-17 08:17:22 -07:00
Sunny Goyal
eb4b79935e Removing icon_type column
Icon type is not used consistently. It is used initially
during the loader. Afterwards, we save both the icon and resource to the db.
Instead of changing the logic to always read the shortcut-resource first, and fallback to the bitmap if the resource is not available,
always write the bitmap to DB whenever the shortcut is edited.

Change-Id: I0ea5e88f8904bd3250ca669220b3e5d6aeef1bfd
2016-05-11 15:21:42 -07:00
Sunny Goyal
b5b55c8012 Removing LauncherProvider dependency in DatabaseHeler
This will allow DatabaseHeler to easily be moved to an independent class

Change-Id: I9a3d5d3380ed0af246d7a01553a492467c3096b0
2016-05-10 12:30:47 -07:00
Sunny Goyal
f82e547359 Fixing syntax error
Change-Id: I8fbcd34d891b1d020436e9aa430fd26372910a63
2016-01-06 15:09:22 -08:00
Sunny Goyal
96a0963c4a Adding support for negative x and y in layout xml.
Fixing default configurations for some screen sizes.

> Negative values for x and y are parsed as distance from end
column and row respectively. e.g.  (-1, -2) => (3, 2) in a
4x4 grid

Bug: 26110981
Change-Id: I4ca30e225ed6e2a31610ab23235d2cd10e8d317c
2015-12-18 17:17:08 -08:00
Adam Cohen
cf0c746ec0 Always log if Package is missing while loading default workspace
Change-Id: I7f2e5a9aabdf1fc192ad7912aaefa3f41c059ff1
2015-08-06 14:07:49 -07:00
Sunny Goyal
56a57bb6bb Adding item rank when parsing a folder
Bug: 22059402
Change-Id: Ie57f2dd58d2b4bc2eb277f10e93a25d026d1cdd2
2015-07-06 11:16:17 -07:00
Adam Cohen
2e6da1539b Refactoring DeviceProfile
-> Pulling out the parts of device profile which can (and need to be)
   initialized and accessed without access to an Activity context,
   ie. the invariant bits.
-> The invariant bits are stored in InvariantDeviceProfile which is
   initialized statically from LauncherAppState.
-> The DeviceProfile contains the Activity context-dependent bits,
   and we will create one of these for each Activity instance, and
   this instance is accessed through the Launcher activity.
-> It's possible that we can continue to refactor this such that
   all appropriate dimensions can be computed without an Activity
   context (by only specifying orientation). This would be an
   extension of this CL and allow us to know exactly how launcher
   will look in both orientations from any context.

Sets the stage for some improvements around b/19514688

Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
2015-05-21 16:16:40 -07:00
Sunny Goyal
1d4a2df091 Removing ContentObserver from LauncherModel, and calling reload
whereever necessary

Change-Id: Ia4a8abdfe2be9703f3217a60527d3a1220b33bdc
2015-04-01 10:20:18 -07:00
Sunny Goyal
b2d46ceaaa Configuration of workspace through app restrictions
> Checking for a grid specific layout before loading the default layout

Change-Id: I1e8d4176341e61d0876b0a9bea9ad8010e3a0f6a
2015-03-27 13:00:44 -07:00
Adam Cohen
091440a9cb Reducing method count by eliminating synthetic accessors
Elimates 304 methods based on dex analysis

The java compiler generates sythetic accessor methods for all private
fields, methods and contructors accessed from inner classes. By marking them
package-private and @Thunk instead, sythentic accessor methods are no
longer needeed. These annotated elements should be treated as private.

Change-Id: Id0dc2c92733474250d8ff12fa793d3a8adeb1f26
2015-03-20 11:15:54 -07:00
Sunny Goyal
b3a8f80e2e resolved conflicts for merge of b564efb0 to ub-launcher3-master
Change-Id: I4321522dd1b6b3f96e21232d113fad5144b630bc
2015-01-23 14:22:07 -08:00
Sunny Goyal
b564efb024 Adding support for <include> tag in AutoInstall layout
Bug: 19121893
Change-Id: I760fa76d6e63c1aa0152e8cd710aba0d6ef4462a
2015-01-23 13:53:38 -08:00
Sunny Goyal
bb3b02f562 Replacing hotseat icon to an appropriate system app
> During backupi, store the hotseat target app type, based on some predefined
common system apps
> During restore, save this app type in the restore flag, if it is a hotseat app
> During first launcher load, if an app is not being restored, try to replace it
with an appropriate replacement for that type, otherwise delete it.

Bug: 18764649
Change-Id: Ic49e40bd707bd8d7de18bbab8b1e58a0a36426a2
2015-01-22 10:54:50 -08:00
Sunny Goyal
3a5a9d18da Refactoring layout parsing code
Change-Id: Iee5b2280cb1e841bcfe91fdcf523de6fa7f7f3b8
2014-10-17 14:34:49 -07:00
Sameer Padala
8fd74831de Source change to get code compiling on google3
Change-Id: Ib16df8dd9caa04903a664d8cf92767107fe57628
2014-09-22 15:17:18 -07:00
Sunny Goyal
2233c8850d Changing intent action for auto installs
Bug: 17425805
Change-Id: I12e94860206ed62d6ba04f0b5734cc55ba414e45
2014-09-19 12:23:34 -07:00
Sunny Goyal
349426234e Handling label and icon from SessionInfo.
> The ShortcutInfo stores state as bit flags and not as ints
> Intents of auto-install shortcut are automatically updated
upon installation
> Icons/titles for active sessions are cached in IconCache

Change-Id: I2047849f67d4a8aaf2bc346b58110325bb4807d4
2014-09-04 08:18:33 -07:00
Sunny Goyal
0fe505bf82 Autoinstalls loading xml
> Launcher checkes for an apk in the system image with a broadcast
receiver for action:
com.android.launcher3.action.LAUNCHER_CUSTOMIZATION
> Default layout is parsed from that apk, which can also contain
icons and string resources used in the layout config

Change-Id: I44fc9e7c3134f525f7b5db29f4e8bb56e17ce445
2014-08-12 14:13:18 -07:00